Repository navigation
fix: bound system TTS Speak with a process deadline - #10
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 5, 2026, 10:42 PM ET / October 6, 2026, 02:42 UTC (Revision 11). ClawSweeper reviewWhat this changesAdds an optional per-utterance deadline for system speech commands, with CLI documentation and regression coverage, while preserving unlimited playback by default. Merge readiness✅ Ready for maintainer review This PR remains useful: current main cannot time out a hung speech child while connected. The earlier healthy-speech cutoff concern is resolved, runtime proof covers recovery and default compatibility, and no actionable merge blocker was found. Priority: P2 Review scores
Verification
How this fits togetherClawgo is a headless node client that receives chat replies from a gateway bridge and queues them for local speech. Its system speech engine launches an external command for each utterance. flowchart TD
A[Gateway chat replies] --> B[Chat subscriber]
B --> C[Speech queue]
D[Operator timeout setting] --> E[System speech command]
C --> E
E --> F{Completed or timed out}
F --> G[Next queued utterance]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep unlimited speech as the default and let operators explicitly bound individual system speech commands without cancelling the queue. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure path: while the bridge remains connected, a nonterminating system speech child blocks the synchronous queue worker. The supplied after-fix CLI transcript demonstrates recovery; this review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes, the opt-in child deadline is a narrow solution that preserves healthy long playback and existing shutdown cancellation. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 9d0188637d96. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
Keep Speak(ctx) and espeak --. Default timeout 0 leaves healthy speech unlimited. -tts-system-timeout bounds a hung child only when the operator sets it. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
e8df603 to
3878f65
Compare
Replay is on current main. @clawsweeper re-review |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: bound system TTS Speak with a process deadline This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
A hung system TTS child blocks later queued speech while the bridge stays connected. Add the opt-in
-tts-system-timeoutflag to bound one child and release the queue. The default remains0(unlimited), so healthy long utterances continue without a fixed cutoff. Queue/shutdown cancellation and the--separator for spoken text remain in place.The README documents the flag, its default, and how to choose a duration; the Unreleased changelog credits @SebTardif. Sebastien's original commit is retained.
Runtime proof
At head
9a8236dc760d183bbbf852071541b5fa4b362fd3, built and ran the production CLI on Linux amd64 / Go 1.27.1 against a synthetic loopback TCP bridge. The peer acceptedhello, observedchat.subscribe, and sent two real chat-final frames. A synthetic-tts-system-commandlogged each child's start/completion without producing audio.With
-tts-system-timeout 200ms, the first child attempted a 60-second wait. It was killed, the CLI logged a TTS error, and the next queued utterance completed. With no timeout flag, a healthy 31-second child completed before the next utterance began, without a TTS error. Both clients exited successfully on SIGTERM. Temporary synthetic state was used throughout; no live account or speech hardware was involved.Validation:
go mod verify,go test ./...,go test -race ./...,go build ./cmd/clawgo, anddeadcode -test ./...using the CI-pinned v0.49.0 all passed. Independent Codex autoreview of the complete branch, with the production source supplied as context, found no actionable P0–P2 findings. Exact-head CI is green.